package cn.javass.xgen.genconf;

import cn.javass.xgen.genconf.confmanager.ConfManager;
import cn.javass.xgen.genconf.implementors.GenConfImplementor;
import cn.javass.xgen.genconf.vo.GenConfModel;
import cn.javass.xgen.genconf.vo.ModuleConfModel;

import java.util.Map;

/**
 * 负责完成配置管理模块的业务功能
 */
public class GenConfEbo implements GenConfEbi {

    private static GenConfEbo obo = null;

    private GenConfEbo(GenConfImplementor provider) {
        this.provider = provider;
    }

    public static GenConfEbo getInstance(GenConfImplementor provider) {
        if(obo == null){
            return new GenConfEbo(provider);
        }
        return obo;
    }


    /**
     * 持有 获取核心框架配置数据的实现接口对象
     */
    private GenConfImplementor provider = null;


    @Override
    public GenConfModel getGenConf() {

        //todo 获取配置数据
        return ConfManager.getInstance(provider).getGenConf();
    }

    @Override
    public Map<String, ModuleConfModel> getMapModuleConf() {
        //todo 获取配置数据
        return ConfManager.getInstance(provider).getMapModuleConf();
    }
}
